import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// 引入 rem适配
import "@/assets/js/app.js"
// 引入适配css
import "@/assets/css/reset.css"

Vue.config.productionTip = false;

import http from "./http/http.js";
Vue.prototype.$http = http;
//全局引入http方法

import Vant from "vant";
import "vant/lib/index.css";
Vue.use(Vant);
//全部引入vant

import {
  Lazyload
} from "vant";
Vue.use(Lazyload);
//在main.js引入懒加载的指令

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);
//全部引入elemnt-ui


// import Vue from 'vue';
import { Toast } from 'vant';
Vue.use(Toast);
// 引入轻提示

// 时间过滤
Vue.filter("filtime", (val) => {
  let res = new Date(val);
  let year = res.getFullYear();
  let month = res.getMonth() + 1;
  let day = res.getDate();
  let hour = res.getHours();
  let minus = res.getMinutes();
  let second = res.getSeconds();
  return `${year}-${month}-${day} ${hour}:${minus}:${second}`;
});
//定义全局过滤器 fitime 不加s 因为一次只能定义一个 需要多个 就在写一个 vue.filter

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");